<script>
    $(function () {
        $('#page_table_address_${pid}').datagrid({
            fit: true,
            width: '100%',
            height: '100%',
            striped: true,
            pagination: true,
            url: "${contextPath}/security/basic/address_book/page.htm?passportId=${passportId}",
            fitColumns: true,
            pageSize: 10,
            pageList: [10, 50, 100],
            idField: 'id',
            singleSelect: true,
            selectOnCheck: false,
            checkOnSelect: false,
            autoRowHeight: false,
            rowStyler: gridRowStyler,
            columns: [
                [
                    {
                        title: '联系人',
                        align: 'center',
                        field: 'contact',
                        width: 40
                    },
                    {
                        title: '电话',
                        align: 'center',
                        field: 'tel',
                        width: 60
                    },
                    {
                        title: '地址',
                        align: 'center',
                        field: 'address',
                        width: 100,
                        formatter: function (val, row) {
                            return (row.provinceName || '') + (row.cityName || '') + (row.districtName || '') + (row.street || '');
                        }
                    },
                    {
                        title: '默认地址',
                        align: 'center',
                        field: 'defaultAddress',
                        width: 40,
                        formatter: function (val, row) {
                            return val == 1 ? '是' : '否'
                        }
                    }
                ]
            ],
            onLoadSuccess: function () {
                $('#page_table_address_${pid}').datagrid('clearChecked');
                $('#page_table_address_${pid}').datagrid('clearSelections');
            }
        });
    })
</script>
<div class="tab_item" style="display: block">
    <div class="toolbar clearfix">
        <h3>地址薄</h3>
    </div>
    <div class="grid" style="height:345px;">
        <table id="page_table_address_${pid}"></table>
    </div>
</div>
